Skip to content

ci(helios): Pin workflow dependencies - #49

Merged
ryancinsight merged 2 commits into
mainfrom
ci/pin-workflow-actions
Aug 12, 2026
Merged

ci(helios): Pin workflow dependencies#49
ryancinsight merged 2 commits into
mainfrom
ci/pin-workflow-actions

Conversation

@ryancinsight

@ryancinsight ryancinsight commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Outcome\n\nPin all mutable GitHub Actions references in the book and CI workflows to immutable commit SHAs. Advance the Atlas path-dependency and benchmark gate from the stale 1a7cdca reference to merged Atlas main 366640f.\n\n## Verification\n\n- git diff --check\n- workflow scan reports no mutable action refs in the changed workflows\n\nHosted Rust, Python, book, and benchmark gates remain authoritative.

High-level PR Summary

This PR pins all GitHub Actions workflow dependencies from mutable version tags (like @v6, @v5, @stable) to immutable commit SHAs for improved security and reproducibility. Additionally, it updates the Atlas path-dependency reference from the stale commit 1a7cdca to the merged main branch commit 366640f to keep the benchmark gate current.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 .github/workflows/ci.yml
2 .github/workflows/book-pages.yml

Need help? Join our Discord

Summary by CodeRabbit

  • Chores
    • Improved the reliability and reproducibility of automated builds, tests, benchmarks, and Pages deployments.
    • Updated workflow action references to fixed versions without changing build or deployment behavior.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ryancinsight, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a2c82dab-8e18-4a41-b880-8bb29f013e8f

📥 Commits

Reviewing files that changed from the base of the PR and between 1a159fa and 9a79ec4.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

The pull request replaces mutable GitHub Actions tags with commit SHAs in the Pages and CI workflows. It also updates benchmark-related Atlas and benchmark-gate revisions.

Changes

Workflow action pinning

Layer / File(s) Summary
Pages workflow action pinning
.github/workflows/book-pages.yml
Pins checkout, Pages configuration, artifact upload, and deployment actions to commit SHAs.
CI workflow action pinning
.github/workflows/ci.yml
Pins Rust, Python, cache, benchmark, and path-dependency actions. Updates the Atlas dependency and benchmark-gate revisions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Mergeability Score: 🟡 Moderate · up to 1a159

The workflows pin action versions but still persist checkout credentials across six steps, allowing later repository-controlled commands to access the workflow token. Merge should wait until credentials are disabled or the risk is explicitly accepted.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: pinning CI and book workflow dependencies to immutable commit SHAs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pin-workflow-actions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 122-125: Disable persisted credentials on all six checkout steps
by adding persist-credentials: false to the checkout configurations at
.github/workflows/ci.yml lines 17-19, 71-73, 117-120, 122-125, and 142-146, and
.github/workflows/book-pages.yml line 31. Use a separately scoped credential
only for any later authenticated Git operation that requires one.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ae6c06b2-1a1f-4275-9f3a-5bc931e225e4

📥 Commits

Reviewing files that changed from the base of the PR and between 8187665 and 1a159fa.

📒 Files selected for processing (2)
  • .github/workflows/book-pages.yml
  • .github/workflows/ci.yml

Comment thread .github/workflows/ci.yml
Comment on lines 122 to 125
- name: Checkout candidate
uses: actions/checkout@v6
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
path: helios-candidate

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- workflow files ---'
git ls-files .github/workflows/ci.yml .github/workflows/book-pages.yml

printf '%s\n' '--- referenced checkout steps ---'
nl -ba .github/workflows/ci.yml | sed -n '1,170p'
printf '%s\n' '--- book-pages checkout ---'
nl -ba .github/workflows/book-pages.yml | sed -n '20,45p'

printf '%s\n' '--- checkout configuration and git-command usage ---'
rg -n -C 3 'actions/checkout@|persist-credentials|git (fetch|push|pull|submodule|config)|cargo (test|run|build)|python|benchmark|book' .github/workflows/ci.yml .github/workflows/book-pages.yml

Repository: ryancinsight/helios

Length of output: 13927


🌐 Web query:

actions/checkout persist-credentials false GITHUB_TOKEN .git/config README

💡 Result:

The persist-credentials input in actions/checkout controls whether the action configures Git to use the repository's access token (such as GITHUB_TOKEN) for subsequent Git operations performed within the job [1][2]. Behavior by Version: - In versions prior to the recent refactor (typically v5 and earlier), setting persist-credentials: true (the default) caused the action to write the authentication token directly into the repository's.git/config file [3]. - In current versions (notably v6+), the action has been improved to store credentials in a separate file located under $RUNNER_TEMP instead of directly in.git/config [1][2]. It uses Git's includeIf mechanism to conditionally reference this file [4][3]. Security Context: - When persist-credentials is set to true (the default), the token persists on the runner disk until post-job cleanup, enabling downstream steps to execute authenticated Git commands [1][3]. - Setting persist-credentials: false opts out of this behavior, preventing the action from writing the token to either.git/config or the temporary file, thereby reducing the credential's exposure surface [1][3]. - Note that setting this to false only affects the "persistence" of the token into Git configuration; it does not change the fact that the GITHUB_TOKEN itself remains available as an environment variable to all steps within the job [5]. If your goal is to minimize security risks, it is a recommended best practice to set persist-credentials: false if your workflow does not require authenticated Git operations in later steps [3].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- ci.yml: jobs, permissions, and checkout consumers ---'
cat -n .github/workflows/ci.yml | sed -n '1,340p'

printf '%s\n' '--- book-pages.yml ---'
cat -n .github/workflows/book-pages.yml | sed -n '1,100p'

printf '%s\n' '--- actions/checkout metadata at the pinned commit ---'
curl --fail --silent --show-error \
  https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/action.yml

printf '%s\n' '--- actions/checkout source references at the pinned commit ---'
for file in src/input-helper.ts src/git-auth-helper.ts src/main.ts; do
  printf '\n--- %s ---\n' "$file"
  curl --fail --silent --show-error \
    "https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/$file" \
    | grep -n -E -C 4 'persist-credentials|extraheader|GITHUB_TOKEN|configureAuth|removeAuth'
done

Repository: ryancinsight/helios

Length of output: 24116


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
from pathlib import Path
import re

for name in (".github/workflows/ci.yml", ".github/workflows/book-pages.yml"):
    text = Path(name).read_text()
    print(f"--- {name} checkout blocks ---")
    lines = text.splitlines()
    for i, line in enumerate(lines):
        if "actions/checkout@" in line:
            start = max(0, i - 1)
            end = min(len(lines), i + 8)
            print("\n".join(f"{j+1}: {lines[j]}" for j in range(start, end)))
            print()
PY

Repository: ryancinsight/helios

Length of output: 2399


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- authentication implementation at the pinned commit ---'
curl --fail --silent --show-error \
  https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/src/git-auth-helper.ts \
  | sed -n '45,145p;225,265p'

printf '%s\n' '--- action version and commit identity ---'
curl --fail --silent --show-error \
  https://api.github.com/repos/actions/checkout/commits/d23441a48e516b6c34aea4fa41551a30e30af803 \
  | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps({"sha": d.get("sha"), "message": d.get("commit",{}).get("message"), "date": d.get("commit",{}).get("committer",{}).get("date")}, indent=2))'

printf '%s\n' '--- tags pointing to or containing the pinned commit ---'
curl --fail --silent --show-error \
  'https://api.github.com/repos/actions/checkout/commits/d23441a48e516b6c34aea4fa41551a30e30af803/tags' \
  | python3 -c 'import json,sys; print("\n".join(x["name"] for x in json.load(sys.stdin)))'

printf '%s\n' '--- checkout README security guidance at the pinned commit ---'
curl --fail --silent --show-error \
  https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/README.md \
  | grep -n -E -C 5 'persist-credentials|untrusted|token'

Repository: ryancinsight/helios

Length of output: 5555


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- configureToken implementation ---'
curl --fail --silent --show-error \
  https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/src/git-auth-helper.ts \
  | grep -n -A55 -B8 'private async configureToken'

printf '%s\n' '--- callers that control credential persistence ---'
curl --fail --silent --show-error \
  https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/src/git-source-provider.ts \
  | grep -n -E -A12 -B12 'persistCredentials|configureAuth|configureGlobalAuth|removeAuth'

printf '%s\n' '--- README guidance ---'
curl --fail --silent --show-error \
  https://raw.githubusercontent.com/actions/checkout/d23441a48e516b6c34aea4fa41551a30e30af803/README.md \
  | grep -n -E -A8 -B8 'persist-credentials'

Repository: ryancinsight/helios

Length of output: 9673


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
from pathlib import Path
import re

for name in (".github/workflows/ci.yml", ".github/workflows/book-pages.yml"):
    text = Path(name).read_text()
    print(f"--- {name}: permissions and execution steps ---")
    for i, line in enumerate(text.splitlines(), 1):
        if re.search(r"(^|\s)(permissions:|pull_request:|push:|run:|uses:)", line):
            print(f"{i}: {line}")
PY

Repository: ryancinsight/helios

Length of output: 2957


Disable persisted credentials on every checkout.

actions/checkout defaults persist-credentials to true. At this pinned version, it stores the token in $RUNNER_TEMP and adds a local Git configuration reference in each checkout. Later repository-controlled commands can access the token. Add persist-credentials: false to all six checkout steps. Use a separately scoped credential only when a later authenticated Git operation requires one.

🧰 Tools
🪛 zizmor (1.29.0)

[warning] 122-125: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 2 files
  • .github/workflows/ci.yml#L122-L125 (this comment)
  • .github/workflows/book-pages.yml#L31-L31
  • .github/workflows/ci.yml#L17-L19
  • .github/workflows/ci.yml#L71-L73
  • .github/workflows/ci.yml#L117-L120
  • .github/workflows/ci.yml#L142-L146
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 122 - 125, Disable persisted
credentials on all six checkout steps by adding persist-credentials: false to
the checkout configurations at .github/workflows/ci.yml lines 17-19, 71-73,
117-120, 122-125, and 142-146, and .github/workflows/book-pages.yml line 31. Use
a separately scoped credential only for any later authenticated Git operation
that requires one.

Source: Linters/SAST tools

@ryancinsight
ryancinsight merged commit c4013fc into main Aug 12, 2026
4 of 5 checks passed
@ryancinsight
ryancinsight deleted the ci/pin-workflow-actions branch August 12, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant